package com.gitee.wsl.mathematics.vector

import com.gitee.wsl.mathematics.vector.ext.dot
import com.gitee.wsl.mathematics.vector.vec2.Vec2f
import com.gitee.wsl.mathematics.vector.vec3.Vec3f
import com.gitee.wsl.mathematics.vector.vec4.Vec4f
import kotlin.test.Test
import kotlin.test.assertEquals

class DotTest {
    @Test
    fun vec2_dot() = assertEquals(26f,  Vec2f(2f, 3f).dot(Vec2f(4f, 6f)))

    @Test
    fun vec3_dot() = assertEquals(58f,  Vec3f(2f, 3f, 4f).dot(Vec3f(4f, 6f, 8f)))

    @Test
    fun vec4_dot() = assertEquals(108f, Vec4f(2f, 3f, 4f, 5f).dot(Vec4f(4f, 6f, 8f, 10f)))
}